<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
	uri="/WEB-INF/tags/shiro.tld"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>初始化字段维护</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<%
	Locale locale =SessionHelper.getLocaleByUser(request);
%>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<jsp:include
	page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<script type="text/javascript"
	src="avicit/cbb/techclass/tabledefine/commtempletmanager/comm_init_field_manager.js"></script>
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<script type="text/javascript">
var treeId = "${tId}";
var dialogId = "${dialogId}";
var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
	//此事件必须放在jsp中,不能提取到js中,否则不能加载数据
	$(function() {
		sysId = "${sysId}";
		myDetailDatagrid = $('#commTempletFieldDataGrid')
				.datagrid(
						{
							url : 'platform/aos/commtempletmanagerController/getCommTempletFieldData.json?tid='
									+ treeId + "&isStructure=N"
						});
		
		//多语言
		remind = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.remind","i18n.lantop",locale)%>";
		No = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.No","i18n.lantop",locale)%>";
		fieldCNNameNotNull = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.fieldCNNameNotNull","i18n.lantop",locale)%>";
		fieldNameIllegal = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.fieldNameIllegal","i18n.lantop",locale)%>";
		selectFieldType = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.selectFieldType","i18n.lantop",locale)%>";
		lengthNotExceed4000 = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.lengthNotExceed4000","i18n.lantop",locale)%>";
		lengthNotExceed16 = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.lengthNotExceed16","i18n.lantop",locale)%>";
		decimalNumNotExceed6 = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.decimalNumNotExceed6","i18n.lantop",locale)%>";
		decimalNumNull = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.decimalNumNull","i18n.lantop",locale)%>";
		lengthNull = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.lengthNull","i18n.lantop",locale)%>";
		selectType = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.selectType","i18n.lantop",locale)%>";
		check = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField.check","i18n.lantop",locale)%>";
		noSave = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.save.noSave","i18n.lantop",locale)%>";
		field = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.save.field","i18n.lantop",locale)%>";
		alreadyExist = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.save.alreadyExist","i18n.lantop",locale)%>";
		success = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.save.success","i18n.lantop",locale)%>";
		showValue = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.save.showValue","i18n.lantop",locale)%>";
		repeat = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.save.repeat","i18n.lantop",locale)%>";
		trueValue = "<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.save.trueValue","i18n.lantop",locale)%>";
	});
	
	//SanXiaFiles Create By Tangkun start
	function getResultByInput(){
		$('#commTempletFieldDataGrid').datagrid({
			url : 'platform/aos/commtempletmanagerController/getCommTempletFieldData.json?tid='
				+ treeId + "&isStructure=N&inputWord=" + encodeURI(encodeURI($('#query').val()))
					
		});
	}
	function keyDownQuery(){
		if(event.keyCode==13){
			getResultByInput();
		}
	}
	// SanXiaFiles Create By Tangkun End
	
</script>
<style type="text/css">
.textbox {
	border: solid 1px #a5acb5;
}

.input,img {
	vertical-align: middle;
}
.panel-header{
	 background:white;
}
</style>
</head>
<body id="myBody" class="easyui-layout" data-options="fit:true">
	<%-- 基础字段表 --%>
	<div data-options="region:'center',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.basicFieldTable","i18n.lantop",locale)%>'" id="tgrid"
		style="height: 0; font-size: 0;">
		<div id="tb1" style="padding:10px 0;">
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_addTempField">
				<%-- 添加字段 --%>
				<a class="easyui-linkbutton selbtnc"  iconCls="icon-im-add"
					onclick="appendField();" href="javascript:void(0);"
					id="addTempField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.addField","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_deleteTempField">
				<%-- 删除字段 --%>
				<a class="easyui-linkbutton selbtnc"  iconCls="icon-im-remove"
					onclick="deleteInitDetail('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.confirm","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.confirm.confirmContent","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.success","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.failure","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField.remind.content","i18n.lantop",locale)%>');" href="javascript:void(0);"
					id="deleteTempField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.deleteField","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_saveField">
				<%-- 保存 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-im-save"
					onclick="saveField();" href="javascript:void(0);" id="saveField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.save","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<%-- SanXiaFiles Update Tangkun Start
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_searchField">
				查询
				<a class="easyui-linkbutton" plain="true" iconCls="icon-im-search"
					onclick="searchField('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.search","i18n.lantop",locale)%>');" href="javascript:void(0);" id="searchField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.search","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_initFieldExport">
				导出结构数据
				<a class="easyui-linkbutton" plain="true" iconCls="icon-im-export"
					onclick="inintFieldExportData();" href="javascript:void(0);"
					id="initFieldExport"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.exportConstructionData","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_initFieldImportExcel">
				导入结构数据
				<a class="easyui-linkbutton" plain="true" iconCls="icon-im-import"
					onclick="openInitFieldImportDialog('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.importConstructionData.importData","i18n.lantop",locale)%>');" href="javascript:void(0);"
					id="initFieldImportExcel"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.importConstructionData","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_initFieldExportExcelMoudle">
				下载结构模板
				<a class="easyui-linkbutton" plain="true"
					iconCls="icon-im-newndownload"
					onclick="inintFieldExportExcelMoudle();" href="javascript:void(0);"
					id="initFieldExportExcelMoudle"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.downloadConstructionTemplate","i18n.lantop",locale)%></a>
			</sec:accesscontrollist> 
			SanXiaFiles Update Tangkun End--%>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_sameInitField">
				<%-- 同步初始化字段 --%>
				<a class="easyui-linkbutton selbtnc" 
					iconCls="icon-im-newinitfield" onclick="sameInitField('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.sameInitField.success","i18n.lantop",locale)%>');"
					href="javascript:void(0);" id="sameInitField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.sameInitField","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_backButton">
			<%--SanXiaFiles Update Tangkun Start
			<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_button_LanguageForm">
						<a class="easyui-linkbutton" iconCls="icon-tools" plain="true" onclick="openLanguageForm('commTempletFieldDataGrid','1');" href="javascript:void(0);">语言设置</a>
			</sec:accesscontrollist> 
			SanXiaFiles Update Tangkun End--%>
				<%-- 返回 --%>
				<a id="backButton" class="easyui-linkbutton selbtn"
					onclick="closeWindow();" href="javascript:void(0);">
					<img src="avicit/im/lantop/common/search/image/icon_tool42_blue.png"><span class="selbtc">
					<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.return","i18n.lantop",locale)%></span></a>
			</sec:accesscontrollist>
			
			<!--   
						SanXiaFiles Create By Tangkun End 
						-->
						
				<div style="background: white;  height: 25px; border-radius: 3px; border: 1px solid #ccc; float: right;">
					<input placeholder="快速检索" type="text" id="query" onblur="getResultByInput()" onkeydown="keyDownQuery()"
						style="float: left; box-sizing: border-box; padding-left: 5px; width: 100px; height: 25px; outline: none; border: none;" />
					<img src="avicit/im/lantop/common/search/image/icon_tool14.png"
						style="float: right; margin-top: 2px; margin-right: 2px;cursor: pointer;"> 
				</div>

			<!-- 
						 SanXiaFiles Create By Tangkun End  
					-->
			
		</div>
		<table style="height:35px;" id="commTempletFieldDataGrid" 
			data-options="
				rownumbers: true,
				animate: true,
				collapsible: false,
				fitColumns: false,
				autoRowHeight: false,
				singleSelect: true,
				pagination:true,
				pageSize:100, 
				pageList:[100,150,200], 
	    		striped:true,
				fit:true,
				method: 'post',
				toolbar: '#tb1',
				onLoadSuccess : onLoadSuccessData,
				onClickCell:onClickCell,
				selectOnCheck : false,
				checkOnSelect : false
			">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_id">
						<th data-options="field:'id', halign:'center',checkbox:true"
							title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colLabel">
						<%-- 字段中文名 --%>
						<th
							data-options="field:'colLabel', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,validType:'length[0,20]'}}"
							width="100" title="字段中文名"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.fieldCHNName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colName">
						<%-- 字段名 --%>
						<th
							data-options="field:'colName', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,validType:'length[0,30]'}}"
							width="100" title="字段名"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填">
							<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.fieldName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colType">
						<%-- 字段类型 --%>
						<th
							data-options="field:'colType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{onSelect : typeSelect,onHidePanel: typeOnHidePanel,required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'string',lookupName:'字符串'},{lookupCode:'integer',lookupName:'整型'},{lookupCode:'date',lookupName:'日期时间型'},{lookupCode:'float',lookupName:'浮点型'},{lookupCode:'blob',lookupName:'BLOB'},{lookupCode:'clob',lookupName:'CLOB'}],editable:false}},formatter:fomaterColType"
							width="100" title="字段类型"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.fieldType","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colLength">
						<%-- 长度 --%>
						<th
							data-options="field:'colLength', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,5]'}}"
							width="100" title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.length","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colDecimal">
						<%-- 小数位数 --%>
						<th
							data-options="field:'colDecimal', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[1,6]'}}"
							width="100" title="小数位数"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.decimalNum","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsSys">
						<%-- 系统字段 --%>
						<th
							data-options="field:'colIsSys', halign:'center', align:'center', sortable:false,formatter:fomaterYn"
							width="100" title="系统字段"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.systemField","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsDisplay">
						<%-- 是否可见 --%>
						<th
							data-options="field:'colIsDisplay', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsShow"
							width="100" title="是否可见"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.isVisible","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 是否必著 --%>
						<th
							data-options="field:'colIsMust', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsMust"
							width="100" title="是否必著"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.isMustRecord","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 是否显示（添加/编辑） --%>
						<th
							data-options="field:'colIsVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsVisible"
							width="100" title="是否显示（添加/编辑）"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.isShow(add/edit)","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 是否编辑（添加/编辑） --%>
						<th
							data-options="field:'colIsEdit', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsEdit"
							width="100" title="是否编辑（添加/编辑）"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.isEdit(add/edit)","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 表格显示 --%>
						<th
							data-options="field:'colIsTabVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsTabVisible"
							width="100" title="表格显示"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.tableShow","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 详细显示 --%>
						<th
							data-options="field:'colIsDetail', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsDetail"
							width="100" title="详细显示"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.detailShow","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 查询字段 --%>
						<th
							data-options="field:'colIsSearch', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsSearch"
							width="100" title="查询字段"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.searchField","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colIsMust">
						<%-- 类型 --%>
						<th
							data-options="field:'colDropdownType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,50]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'0',lookupName:'无'},{lookupCode:'1',lookupName:'参选'},{lookupCode:'2',lookupName:'只选'},{lookupCode:'3',lookupName:'选择'}],editable:false,onSelect:onSelectCom,onHidePanel: selectTypeOnHidePanel}},formatter:fomaterType"
							width="100" title="下拉类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.type","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colRuleTitle">
						<%-- 生成规则 --%>
						<th
							data-options="field:'colRuleTitle', halign:'center', align:'center', sortable:false, editor:{type:'text'}"
							width="100" title="生成规则"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.createRule","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colRuleName">
						<th
							data-options="field:'colRuleName',halign:'center', align:'center', editor:{type:'text'},hidden:true"
							width="100" title="生成规则英文">生成规则英文</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_customPath">
						<th
							data-options="field:'customPath',halign:'center', align:'center', editor:{type:'text'},hidden:true"
							width="100" title="路径">路径</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_colOrder">
						<%-- 表单顺序 --%>
						<th
							data-options="field:'colOrder', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,4]'}}"
							width="100" title="表单顺序">表单顺序</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_attribute11">
						<%-- 表格顺序 --%>
						<th
							data-options="field:'attribute11', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,4]'}}"
							width="100" title="表格顺序">表格顺序</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_remark">
						<%-- 备注 --%>
						<th
							data-options="field:'remark', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{'validType':'length[0,200]'}}"
							width="100" title="备注"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.comment","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtablemanager_table_structure_datagrid_isNew">
						<th
							data-options="field:'isNew', halign:'center', align:'center',hidden: true,editor:{type:'text'}"
							width="100" title="是否新建">是否新建</th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
	</div>
	<%-- 通用代码表 --%>
	<div data-options="region:'east',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.generalCodeTable","i18n.lantop",locale)%>'"
		style="height: 0;padding:0 10px;overflow: hidden; font-size: 0;" id="codeDataDiv">
		<script type="text/javascript">
			//在此给div定义宽度（当easyui解析到该div时才能将宽度加上去）
			$("#codeDataDiv").css("width", $(window).width() * 0.47 + "px");
		</script>
		<div id="tb2" style="padding:10px 0;">
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_appendCode">
				<%-- 添加 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-im-add"
					onclick="appendCode('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.add.remind.content","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.add.remind.content2","i18n.lantop",locale)%>');" href="javascript:void(0);" id="appendCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.add","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_saveCode">
				<%-- 保存 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-im-save"
					onclick="saveCode();" href="javascript:void(0);" id="saveCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.save","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_deleteWcode">
				<%-- 删除 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"
					onclick="deleteWcode('<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete.confirm","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete.confirm.confirmContent","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete.success","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete.failure","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete.remind.content","i18n.lantop",locale)%>');" href="javascript:void(0);"
					id="deleteWcode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.delete","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_init_field_manager_button_selectCode">
				<%-- 引用 --%>
				<a class="easyui-linkbutton selbtnc" 
					iconCls="icon-im-newinsert" onclick="selectCode();"
					href="javascript:void(0);" id="selectCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.quote","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<%--SanXiaFiles Update Tangkun Start  
			 <sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_button_LanguageForm">
						<a class="easyui-linkbutton" iconCls="icon-tools" plain="true" onclick="openLanguageForm('commTempletCodeDataGrid','2');" href="javascript:void(0);">语言设置</a>
			</sec:accesscontrollist> 
			SanXiaFiles Update By Tangkun End--%>
		</div>
		<table id="commTempletCodeDataGrid" class="easyui-datagrid" 
			data-options="
								rownumbers: true,
								animate: true,
								collapsible: false,
								fitColumns: true,
								autoRowHeight: false,
								singleSelect: true,
								selectOnCheck : false,
								checkOnSelect : false,
								pagination:true,
								pageSize:100, 
								pageList:[100,150,200], 
					    		striped:true,
								fit:true,
								method: 'post',
								sortName : 'CODE_ORDER',
								sortOrder: 'asc',
								toolbar: '#tb2',
								remoteSort: false,
								onClickRow : onClickRowCode,
								url: 'platform/aos/commtempletmanagerController/getCommTempletCodeData.json'
						">
			<thead>
				<tr>

					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_ID">
						<th data-options="field:'ID', halign:'center',checkbox:true"
							title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_CODE_ORDER">
						<%-- 顺序 --%>
						<th
							data-options="field:'CODE_ORDER', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{required:true,'validType':'length[0,10]'}}"
							width="100" title="顺序"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.order","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_LOOKUP_NAME">
						<%-- 显示值 --%>
						<th
							data-options="field:'LOOKUP_NAME', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
							width="100" title="显示值"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.showValue","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_LOOKUP_CODE">
						<%-- 真实值 --%>
						<th
							data-options="field:'LOOKUP_CODE', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
							width="100" title="真实值"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.trueValue","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_CODE_IS_VALID">
						<%-- 是否有效 --%>
						<th
							data-options="field:'CODE_IS_VALID', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,4]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'Y',lookupName:'有效'},{lookupCode:'N',lookupName:'无效'}],editable:false}},formatter:fomaterVa"
							width="100" title="否有效"><img
							src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.iseffective","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_init_field_manager_datagrid_CTYPE">
						<%-- 类型 --%>
						<th
							data-options="field:'CTYPE', halign:'center', align:'center', sortable:false,formatter:fomaterCType"
							width="100" title="类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.type","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
	</div>
</body>
</html>
